QuickTime 3 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Text Media Handler Functions

QuickTime 1.6.1 added five new flags, two constants, and one new function to the text media handler interface. The new flags and constants are defined in "Text Sample Display Flags" , and "Text Atom Types" , respectively. The new function is defined in this section.

TextMediaSetTextSampleData

The TextMediaSetTextSampleData function allows you to set values before calling the AddTextSample or AddTESample function.

pascal ComponentResult TextMediaSetTextSampleData(
                     MediaHandler mh,
                     void *data,
                     OSType dataType)
mh
Contains a reference to the text media handler. You obtain this reference from the GetMediaHandler function.
data
Contains a pointer to the data, defined by the dataType parameter.
dataType
Specifies the type of data.

RESULT CODES

memFullErr
-108 Not enough room in heap zone
paramErr
-50 Invalid parameter specified

DISCUSSION

The following sample code demonstrates how to use the TextMediaSetTextSampleData function:

short           trans = 127;
Point           dropOffset;
MediaHandler    mh;

dropOffset.h = dropOffset.v = 4
TextMediaSetTextSampleData(mh,(void *)&dropOffset,dropShadowOffsetType);
TextMediaSetTextSampleData(mh,(void *)&trans,dropShadowTranslucencyType);

Be sure to turn on the dfDropShadow display flag after you call AddTextSample or AddTESample . Passing nil for the textColor parameter in AddTextSample or AddTESample defaults to black . Passing nil for the backColor parameter in AddTextSample or AddTESample defaults to white .

RESULT CODES

badComponentInstance
0x80008001 Invalid component instance specified.

© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |